package org.example.Contoller;

import jakarta.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.net.http.HttpRequest;

@Controller
@RequestMapping("jsp")
public class JspController {

    @GetMapping("index")
    public String index(HttpServletRequest request) {
        request.setAttribute("data","张三");
        return "index"; //返回值写对应中间的视图名称即可，跳转至index.jsp页面
    }
}
